﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="Flight.aspx.cs" Inherits="Admin_Flight" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style6
        {
            width: 100%;
        }
        .style7
        {
            width: 723px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style6">
        <tr>
            <td colspan="2" style="text-align: center">
                Lịch bay</td>
        </tr>
        <tr>
            <td class="style7">
                <asp:Label ID="Label1" runat="server"></asp:Label>
            </td>
            <td>
                <asp:Button ID="btnAddNew" runat="server" onclick="btnAddNew_Click" 
                    Text="Thêm mới" Width="81px" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    Width="777px" AllowPaging="True" PageSize="5" 
                    onpageindexchanging="GridView1_PageIndexChanging">
                    <Columns>
                        <asp:BoundField DataField="flightID" HeaderText="Mã chuyến bay" />
                        <asp:BoundField DataField="planeName" HeaderText="Tên máy bay" />
                        <asp:BoundField DataField="departure" HeaderText="Nơi xuất phát" />
                        <asp:BoundField DataField="arrival" HeaderText="Nơi đến" />
                        <asp:BoundField DataField="miles" HeaderText="Khoảng cách" />
                        <asp:BoundField DataField="startTime" HeaderText="Thời gian bay" />
                        <asp:BoundField DataField="departureDate" HeaderText="Ngày bay" />
                        <asp:BoundField DataField="endTime" HeaderText="Thời gian đến" />
                        <asp:BoundField DataField="arrivalDate" HeaderText="Ngày đến" />
                        <asp:BoundField DataField="price" HeaderText="Giá vé" />
                        <asp:BoundField DataField="promotionsName" HeaderText="Khuyến mại" />
                        <asp:TemplateField HeaderText="Thao tác">
                            <ItemTemplate>
                                <table class="style6">
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="lbEdit" runat="server" 
                                                CommandArgument='<%# Eval("flightID","{0}") %>' onclick="lbEdit_Click" 
                                                CommandName="Select">Sửa</asp:LinkButton>
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="Delete" runat="server" 
                                                CommandArgument='<%# Eval("flightID","{0}") %>' onclick="Delete_Click" 
                                                CommandName="Select" onclientclick="return confirm('Are you sure?');">Xóa</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>

